import config from "@/config"
import http from "@/utils/request"

export default {
	login: {
		url: `${config.API_URL}/xunheng-system/login`,
		name: "登录获取TOKEN",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	logout: {
		url: `${config.API_URL}/xunheng-system/logout`,
		name: "退出登录",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	getUserInfo: {
		url: `${config.API_URL}/xunheng-system/user/getByUsername`,
		name: "获取用户信息",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	initCaptcha:{
		url: `${config.API_URL}/xunheng-system/captcha/load`,
		name: "加载验证码",
		get: async function(){
			return await http.get(this.url);
		}
	},
	slideCaptchaGet:{
		url: `${config.API_URL}/xunheng-system/captcha/slideVerify/get`,
		name: "滑动验证码加载",
		post: async function(data={}){
			return await http.post(this.url,data);
		}
	},
	slideCaptchaCheck:{
		url: `${config.API_URL}/xunheng-system/captcha/slideVerify/check`,
		name: "滑动验证码验证",
		post: async function(data={}){
			return await http.post(this.url,data);
		}
	},

}
